﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
    public partial class Main : Form
    {
        public Main()
        {
            InitializeComponent();
        }

        private void Main_Load(object sender, EventArgs e)
        {
            this.comboBoxSortFinished.SelectedIndex = 0;
            this.comboboxSortActive.SelectedIndex = 0;
            this.comboBoxSortStatistics.SelectedIndex = 0;
        }

        private void trackBarScore_Scroll(object sender, EventArgs e)
        {
            double x = trackBarScore.Value;
            x = x/2;
            textBoxScore.Text = x.ToString();
        }

        private void textBoxScore_TextChanged(object sender, EventArgs e)
        {
            if (textBoxScore.Text != null)
            {
                double x = Convert.ToDouble(textBoxScore.Text);
                x = x*2;
                trackBarScore.Value = Convert.ToInt32(x);
            }
        }

        private void radioButtonCustomDiveCode_CheckedChanged(object sender, EventArgs e)
        {
            if ( textBoxDiveCode.Enabled == false)
                textBoxDiveCode.Enabled = true;
            else
                textBoxDiveCode.Enabled = false;
        }

    }
}
